/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       split_creatures_dialog.h

	$Header: /game/split_creatures_dialog.h $

	$NoKeywords: $

 ************************************************************************/
#ifndef SPLIT_CREATURES_DIALOG_H_INCLUDED
#define SPLIT_CREATURES_DIALOG_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "bitmap_group_ptr.h"
#include "dialog_box.h"
#include "scrollbar_ptr.h"
#include "text_window_ptr.h"

enum  t_creature_type;

// ------------------------------------------------------------------
// dialog for splitting one creature stack into 2 groups
// ------------------------------------------------------------------
class t_split_creatures_dialog : public t_dialog_box
{
public:
	t_split_creatures_dialog( t_creature_type creature_type, int amount_left,
		                      int amount_right, t_window* parent,
							  int min_left = 1, int min_right = 1 );
	int get_amount() const;
	int get_left() const;
protected:
	t_text_window* add_text( std::string const& text, std::string const& layer_name );
	void		   slider_change( t_scrollbar* scrollbar, int value );

	t_creature_type     m_creature_type;
	int					m_amount;
	int					m_max_amount;
	int					m_min_amount;
	int					m_maximum;
	t_bitmap_group_ptr  m_layout;
	t_text_window_ptr   m_source_number;
	t_text_window_ptr   m_dest_number;
	t_scrollbar_ptr		m_scrollbar;
};

inline int t_split_creatures_dialog::get_amount() const
{
	return m_amount;
}

inline int t_split_creatures_dialog::get_left() const
{
	return m_maximum - m_amount;
}

#endif // SPLIT_CREATURES_DIALOG_H_INCLUDED